package com.niit.controller;

import com.niit.entity.User;
import com.niit.mapper.UserMapper;
import com.niit.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

public class TestUser {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSqlSession();

        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);

        User user = userMapper.getById("Anna");
        System.out.println(user.getUserHobbies());
    }
}
